<% if @session_admin_order %>
  <%= render partial: '/admin/shopping/checkout/right_panel_summary'%>
<% else %>
<h3>
  <%= session_admin_cart.customer_id ? session_admin_cart.customer.name : 'No Customer' %>
</h3>
<%= link_to 'change customer', admin_shopping_users_path %>
  <table>
    <thead>
      <tr class='odd'>
        <th class='column1_header'>
          Item

        </th><th>Price:</th><th>Qty</th><th>Price + Tax</th>
      </tr>
    </thead>
    <% session_admin_cart.shopping_cart_items.each do |item| %>
      <tr class='<%= cycle("odd", "")%> '>
        <td><%= item.variant.product_name %></td>
        <td><%= item.variant.price %></td>
        <td><%= item.quantity %></td>
        <td><%= item.quantity.to_f * item.variant.price %></td>
      </tr>
    <% end %>
    <tr class='odd top_border'>
      <td></td>
      <td>Sub-total:</td>
      <td></td>
      <td><%= sub_total = session_admin_cart.shopping_cart_items.inject(0) {|total,i| (i.quantity.to_f * i.variant.price) + total } %></td>
    </tr>
    <tr>
      <td></td>
      <td>Shipping Charges:</td>
      <td></td>
      <td> TBD </td>
    </tr>
    <tfoot>
      <tr class='even'>
        <td></td><td>Total:</td><td></td><td><em>TBD</em></td>
      </tr>
    </tfoot>
  </table>
  <% unless session_admin_cart.shopping_cart_items.empty? %>
    <%= link_to 'Checkout', start_checkout_process_admin_shopping_checkout_order_path, class: 'button', method: 'POST' %>
  <% end %>
<% end %>
